Most modern data processing systems allocate RAM, on an as-needed basis, to procedures prior to their execution. Typically, the allocation is predetermined and ensures that each procedure will have available enough RAM to operate at a level comparable to other executing procedures. Because of limited RAM availability, however, some rationing of RAM amongst operating procedures becomes the norm rather than the exception. As a result, the overall performance of a data processing system is reduced when one procedure is "starved" for RAM while another has an abundance of unused RAM. This often occurs where RAM was preallocated and the current task that is executing is not RAM intensive.
The above noted problem is amplified when one procedure comprises an input/output (I/O) task while another procedure comprises an internally executing task within a computer receiving data via the I/O task. If the I/O task is allocated too much RAM, the internally executing procedure that is receiving the data via the I/O task becomes starved for RAM and the overall efficiency of the data processing system is thus impaired. Needless to say, these types of problems can be avoided where there is an abundance of RAM, however, this is rarely the case.
Preallocation of RAM to various procedures that are to execute within a data processing system requires that the user make assumptions on how the RAM is to be utilized by each procedure and the relative levels of performance between the various procedures. Since procedure performance and relative procedure performance are both dependent upon the task at hand, initial assumptions will typically not provide an optimal memory configuration.
As is known, priorities are assigned to various procedures that execute within a data processing system. It is often the case that procedures that control input/output operations are assigned a lower priority than those procedures which perform internal functions within a data processing system. Furthermore, input/output procedures are often assigned a fixed amount of RAM that is solely available to the I/O function and to none other. This preallocation, by its very nature, restricts the amount of communicating data which can either be received or transmitted by the data processing system. If the preassigned RAM for I/O functions is augmented by variably assignable RAM, there is a risk that other, higher priority procedures will be deprived of needed RAM--unless an appropriate RAM management function is implemented.
As an example, a printer has available to it a set amount of RAM depending upon the amount installed by the user. Typically, a portion of the RAM is allocated for I/O buffers and the remainder is used for rendering of the printer page output. Data is transferred from the host computer to the printer and is collected in the I/O RAM. When the I/O RAM is filled, the host computer is instructed to cease further data transmissions. The printer's formatter then consumes the data from the I/O RAM, returns the I/O RAM to the I/O function for further data reception from the host and renders the output page by utilizing remaining RAM for that purpose. Very often, the data transfer from the host computer is held off while the large amount of unused printer RAM remains unused. This action degrades the printer's performance by increasing the time spent by the host waiting to send data files to the printer.
Accordingly, it is an object of this invention to provide a data processing system with an adaptive memory allocation procedure and apparatus.
It is another object of this invention to provide an adaptive memory allocation procedure which prevents lower priority procedures from being allocated RAM when insufficient RAM is available to satisfy higher priority procedures.
It is yet another object of this invention to provide an adaptive memory allocation procedure wherein input/output functions have access to a variable amount of RAM, such variable amount of RAM also being made available to higher priority procedures.